let serviceId = window.localStorage.getItem("serviceId");
let accountId = window.localStorage.getItem("accountId");
let idcardNo = window.localStorage.getItem("idcardNo");
let realName = window.localStorage.getItem("realName");
let osUsername = window.localStorage.getItem("osUsername");
let serviceStatus = window.localStorage.getItem("serviceStatus");
let unixHost = window.localStorage.getItem("unixHost");
let costName = window.localStorage.getItem("costName");
let pauseDate = window.localStorage.getItem("pauseDate");
let closeDate = window.localStorage.getItem("closeDate");
let costId = window.localStorage.getItem("costId");
let loginPasswd = window.localStorage.getItem("loginPasswd");
let accountStatus = window.localStorage.getItem("accountStatus");
let descr = window.localStorage.getItem("descr");
let costType = window.localStorage.getItem("costType");
let createDate = window.localStorage.getItem("createDate");

$(() => {



    // console.log(serviceId);
    // 业务账号ID
    $('#serviceId').val(serviceId);

    // 账务账号ID：
    // console.log(accountId);
    $('#accountId').val(accountId);

    // 身份证号码：
    // console.log(idcardNo);
    $('#idcardNo').val(idcardNo);

    // 客户姓名：
    // console.log(realName);
    $('#realName').val(realName);

    // OS 账号
    // console.log(osUsername);
    $('#osUsername').val(osUsername);

    // 状态
    // console.log(serviceStatus);
    switch (serviceStatus) {
        case '开通':
            $('#running').attr("selected", "selected");
            break;
        case '暂停':
            $('#pausing').attr("selected", "selected");
            break;
        case '删除':
            $('#deleted').attr("selected", "selected");
            break;
    }

    // 服务器 IP：
    // console.log(unixHost);
    $('#unixHost').val(unixHost);

    // 资费名称：
    // console.log(costName);
    $('#costName').val(costName);

    // 创建时间
    // console.log(createDate);
    $('#createDate').val(createDate);

    // 暂停时间
    // console.log(pauseDate);
    $('#pauseDate').val(pauseDate);

    // 删除时间
    // console.log(closeDate);
    $('#closeDate').val(closeDate);

    // 资费 ID
    // console.log(costId);
    $('#costId').val(costId);

    // 密码
    // console.log(loginPasswd);
    $('#loginPasswd').val(loginPasswd);

    // 账户状态
    // console.log(accountStatus);
    $('#accountStatus').val(accountStatus);

    // 资费说明
    // console.log(descr);
    $('#descr').text(descr);

    // 资费类型
    // console.log(costType);
    $('#costType').val(costType);






    // 返回按钮
    $('#back').click(function () {
        window.location.href = '/service/service_list.html';
    })





});